package net.adst.beans;

/**
 * Created with IntelliJ IDEA.
 * User: alekseipot
 * Date: 01.11.12
 * Time: 5:12
 * To change this template use File | Settings | File Templates.
 */
public class User {
    public static class EmptyUser extends User {
        public EmptyUser() {
            super("", "");
        }
    }

    private String login;
    private String password;
    private boolean admin;

    public User() {

    }

    public User(String login, String password) {
        this.login = login;
        this.password = password;
        this.admin = false;
    }

    public String getLogin() {
        if (login != null) {
            return this.login;
        }
        return new String();
    }

    public String getPassword() {
        if (password != null) {
            return this.password;
        }
        return new String();
    }

    public boolean isAdmin() {
        return admin;
    }

    public void setLogin(String login) {
        if (login != null) {
            this.login = login;
        }
    }

    public void setPassword(String password) {
        if (password != null) {
            this.password = password;
        }
    }

    public void setAdmin(boolean admin) {
        this.admin = admin;
    }


}
